import Vue from 'vue';
import VueRouter from 'vue-router';
import LoginView from '@/views/LoginView.vue';

Vue.use(VueRouter);

const routes = [
  {
    path: '/login',
    component: LoginView,
  },
  {
    path: '/index',
    // 箭头函数引入注册
    component: () => import('@/views/HomePage.vue'),
  },
  {
    path: '*',
    component: () => import('@/views/NotFount.vue'),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
